<template>
  <div class="order_tab">
    <div
      class="tab_item"
      :class="item.value == orderState.activestatus ? 'tab_item_active' : ''"
      v-for="item in orderState.status"
      :key="item.value"
      @click="orderStore.changeactivestatus(item.value)"
    >
      <div class="text">{{ item.label }}</div>
      <div class="num" style="margin-left: 4px">{{item.count}}</div>
    </div>
  </div>
</template>

<script setup>
const { orderStore, orderState } = inject('OrderStore')
</script>

<style lang="scss" scoped>
.order_tab {
  display: flex;
  align-items: center;
}

.tab_item {
  display: flex;
  align-items: center;
  border-bottom: 2px solid #fff;
  margin-right: 24px;
  font-size: 14px;
  padding-bottom: 4px;
  color: #8a8a8a;
  cursor: pointer;
  

  .text {
    font-family: AlibabaPuHuiTi_2_85_;
    display: flex;
    align-items: center;
  }

  .num {
    font-weight: bold;
    display: flex;
    align-items: center;
  }
}

.tab_item_active {
  font-size: 16px;
  font-weight: bold;
  color: #ff7900;
  border-bottom: 2px solid #ff7900;

  .text {
    font-family: AlibabaPuHuiTi_2_85_;
  }
}
</style>